// 已知已占高度为e rpx
const headerHeight = (e) => {
 	// 计算屏幕剩余高度  填补剩余高度
 	e = e ? e : 419;
 	let pormise = new Promise(function(resolve, reject) {
 		uni.getSystemInfo(e).then(
 			(res) => {
 				// 计算组件的高度
 				let scrollviewHigh = res[1].windowHeight - uni.upx2px(e);
				
 				resolve(scrollviewHigh)
 			}).catch(
 			(response) => {
 				reject(response);
 			})
 	})
 	
 	return pormise
 };
 // 已知已占高度为e px
 const headerHeightPx = (e) => {
  	// 计算屏幕剩余高度  填补剩余高度
  	e = e ? e : 0;
  	let pormise = new Promise(function(resolve, reject) {
  		uni.getSystemInfo(e).then(
  			(res) => {
  				// 计算组件的高度
  				let scrollviewHigh = res[1].windowHeight - e;
 				
 				
  				resolve(scrollviewHigh)
  			}).catch(
  			(response) => {
  				reject(response);
  			})
  	})
  	
  	return pormise
  };
  // uni.showToast({
  	
  // })
const  showToast = (text)=>{
	uni.showToast({
		title:text?text:"此功能暂未开放",
		icon:"none"
	})
}
  
 module.exports = {
 	headerHeight,
	headerHeightPx,
	showToast,
 }
